#include "record.h"

esp_err_t record_wav(record_app_data_t* record_app_data);

void record_input_event_proc(struct app_msg *msg)
{
    ESP_LOGI(TAG, "%s: cmd %d", __func__, msg->cmd);

    record_app_data_t* record = record_get_data();

    switch (msg->cmd) {
        case RECORD_MSG_CMD_START:
            recorder_start(record);
        break;

        case RECORD_MSG_CMD_STOP:
            recorder_stop(record);
        break;

        case RECORD_MSG_CMD_PAUSE:
            recorder_pause(record);
        break;

        case RECORD_MSG_CMD_RESUME:
            recorder_resume(record);
        break;

        default:
        break;
    }
}
